/**
 * created by dqn 2018/3/14 19:22
 */

package main.repository;

import main.entity.Comment;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;
import java.util.Optional;
@Repository
@Transactional
public interface CommentRepository extends CrudRepository<Comment,Long> {
    public Optional<List<Comment>> getCommentsBySong(int song);
    public void deleteCommentsBySong(int pk);
    public Optional<List<Comment>> getCommentsByUser(String name);
}
